<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>21_postion定位</title>
    <link rel="stylesheet" href="./css/basic.css">
    <style>
       .container {
        width: 200px;
        height: 200px;
        background-color: pink;
        position: relative;
        margin: 10px 10px;
       }
       .item, .item_2, .item_3, .item_4, .item_5 {
        width: 50px;
        height: 50px;
        background-color: blue;
        position: absolute;
       }
       .item_2 {
        background-color: brown;
        right: 0
       }
       .item_3 {
        background-color: black;
        bottom: 0;
       }
       .item_4 {
        background-color: black;
        bottom: 0;
        right: 0
       }
       .item_5 {
        background-color: burlywood;
        left: 50%;
        top: 50%;
        transform: translate(-25px,-25px);
       }
    </style>
</head>
<body>
    <div class="container">
        <div class="item"></div>
        <div class="item_2"></div>
        <div class="item_3"></div>
        <div class="item_4"></div>
        <div class="item_5"></div>
    </div>
</body>
</html>